using RPAAction.Data_CSO;
using System;
using RPAAction.Excel_CSO;
using Newtonsoft.Json;

namespace RPAAction
{
    public static class Program
    {
        private static void Main(params string[] p)//)//
        {
            try
            {
                //Testrfc(); return;
                if (p.Length > 0)
                {
                    if (p[0].Equals("run"))
                    {
                        Run.Run_(p);
                        return;
                    }
                }
                new RPAAction();
            }
            catch (Exception e)
            {
                Console.Error.WriteLine(e);
                Environment.Exit(-1);
            }
        }

        public static void MainApi(string jsonP)
        {
            Main(JsonConvert.DeserializeObject<string[]>(jsonP));
        }
    }
}